import axios from 'axios'
import apiUrls from 'common/api-urls'
// import { contentTypeWww } from 'common/axio-decorate'
import { removeItemAll } from 'common/storage'
import { removeAllCookie } from 'common/auth'
import global from 'common/globals'

export function userLogout(data) {
  return axios.get(apiUrls.userLogout, {
    params: {
      ...data
    }
  })
  // return axios.post(apiUrls.userLogout, {
  //   ...data
  // }, {
  //   headers: { 'Content-Type': contentTypeWww }
  // })
}

export function clearCacheForLogout() {
  global.store.state.pageStatusInfo = {}
  removeItemAll()
  removeAllCookie()
}
